<?php
namespace app\common\model;

class MemberAreaScore extends Base
{
    static $area = [
			1=>'A区',
			2=>'B区'
		];

    protected $readonly = ['id','uid','area'];

	public function getAreaScoreByUid($uid){
		$data = $this->where(['uid'=>$uid])->select();
		if($data){
			foreach($data as &$value):
				$value=$value->toArray();
				$value['tag'] = self::$area[$value['area']];
			endforeach;
		}else{
			return false;
		}
		return $data;
	}

}
